<template>
  <div class="box">
    <div class="content">
      <ul class="category-list">
        <li @click="goBrand('Phone')">手机</li>
        <li @click="goBrand('FamilyElec')">家电</li>
        <li @click="goBrand('MouthRed')">口红</li>
      </ul>
      <div class="brand">
        <router-view></router-view>
      </div>
    </div>
    <FooterBarVue  class="footer"></FooterBarVue>
  </div>
</template>

<script>
  
import FooterBarVue from '@/components/FooterBar.vue';
export default {
  name:"Category",
  components:{
    FooterBarVue
  },
  created(){
    console.log("category:created");
        // console.log("Category：this.$router",this.$router);
        // console.log("Category：this.$route",this.$route);
  },
  methods:{
    goBrand(path){
      this.$router.push("/Category/"+path);
    }
  }
}
</script>

<style scoped>
  .box{
    width: 100%;
    height:100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }


  .content{
    flex:1;
    overflow: auto;
    display: flex;
  }

  .category-list{
    width: 6.25rem;
    height: 100%;
    border-right:1px solid gray;
  }

  .category-list li{
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-bottom: 1px solid black;
  }

  .brand{
    flex:1;
  }

</style>